package de.schlinke_marius.data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import android.util.Log;

import de.schlinke_marius.application.MSComputerApplication;

public final class AppContainer {

	private static final String TAG = AppContainer.class.getSimpleName();

	private List<Example> examples = new ArrayList<Example>();

//	private List<ConsultingItem> consultingItems = new ArrayList<ConsultingItem>();
	
	private HashMap<Integer, ConsultingItem> consultingItems = new HashMap<Integer, ConsultingItem>();
	
	public void clear() {
		this.examples.clear();
		this.consultingItems.clear();
	}

	public List<Example> getExamples() {
		return examples;
	}

	public int getCount() {
		return examples.size();
	}

	public void addExamples(List<Example> newExamples) {
		for (Example example : newExamples) {
			examples.add(example);
		}
	}

	public void deleteExamples() {
		this.examples.clear();
	}

	public void addConsultingItem(int position, ConsultingItem consultingItem) {
		consultingItems.put(position, consultingItem);
		Log.i(TAG, "consultingitems size:" + consultingItems.size());
	}
	public ConsultingItem getConsultingItem(int position) {
		return consultingItems.get(position);
	}

	public HashMap<Integer, ConsultingItem> getConsultingItems() {
		return consultingItems;
	}

	public void setConsultingItems(HashMap<Integer, ConsultingItem> consultingItems) {
		this.consultingItems = consultingItems;
	}
	public void deleteConsultingItems() {
		this.consultingItems.clear();
	}
}

